# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=exe2hex
pkgver=1.5.1.r6.ge563b35
pkgrel=4
pkgdesc='Inline file transfer using in-built Windows tools (DEBUG.exe or PowerShell).'
arch=('any')
groups=('blackarch' 'blackarch-disassembler')
url='https://github.com/g0tmi1k/exe2hex'
license=('MIT')
depends=('python')
makedepends=('git')
source=("git+https://github.com/g0tmi1k/$pkgname.git")
sha512sums=('SKIP')

pkgver() {
  cd $pkgname

  git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

package() {
  cd $pkgname

  install -Dm 755 "$pkgname.py" "$pkgdir/usr/bin/$pkgname"
  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" *.md
  install -Dm 644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

